There has been known a so-called stereo camera device that measures a distance between a formed image and a subject by disposing plural imaging devices such as cameras for forming an image of a subject. A parallel stereo camera includes two cameras fixed at different positions. A parallel stereo camera device includes two fixed cameras separated from each other by a predetermined distance which is referred to as a base line length. Those two cameras are fixed in a manner such that the optical axes of the cameras are parallel to each other. The stereo camera device is provided to determine the distance to the subject by converting the parallax between a subject image acquired by the first camera and a subject image acquired by the second camera into the distance using a specific parameter in an optical system.
FIG. 7 illustrates an optical system of a conventional stereo camera device. As illustrated in FIG. 7, the stereo camera device 700 includes two cameras 1R and 1L. Those two cameras 1R and 1L are disposed so as to be separated from each other by a predetermined base line length B. Those cameras 1R and 1L include respective image sensors (imaging devices) and imaging lenses (imaging optical systems). The image sensors (imaging devices) are made of a CCD (Charge Coupled Device) or CMOS (Complementary Metal Oxide Semiconductor) sensor or the like. The imaging lenses (imaging optical systems) are provided for forming an image of the subject in an imaging field on an imaging surface of the image sensors (imaging devices).
A method of measuring the distance using two cameras disposed in parallel is described with reference to FIG. 7. In the stereo camera device 700 of FIG. 7, it is assumed that the camera 1R having a focal point distance f, an optical center OR, and an imaging surface SR is disposed in a manner such that the optical axis of the camera 1R extends in the direction parallel to the vertical direction of the sheet of FIG. 7, and that the camera 1L having the same focal point distance f, an optical center OL, and an imaging surface SL is disposed in a manner such that the camera 1L is in parallel to the camera 1R and is separated from the camera 1R by a distance B. By having this configuration, an image of a subject X which is separated from the optical center OR of the camera 1R by a distance d in the optical axis direction is formed at a position PR on the imaging surface SR of the camera 1R, the position PR being the cross point between the straight line passing through the X and optical center OR (hereinafter referred to as a straight line X-OR).
On the other hand, in the camera 1L, the image of the subject X is formed at a position PL on the imaging surface SL of the camera 1L. Further, a straight line passing through the optical center OL of the camera 1L and being parallel to the straight line X-OR is expressed in a dotted line as illustrated in FIG. 7. Further, the cross point between the dotted line and the imaging surface SL is expressed as a position PR′ and the distance between the position PL and the position PR′ is expressed as a distance p. In this case, the position PR′ in the camera 1L corresponds to the position PR in the camera 1R, and the distance p denotes a positional shifted amount of the same subject X on the imaging surfaces of the two cameras. When the distance p is defined as the parallax, since the triangle: X-OR-OL is similar to the triangle: OL-PR′-PL, the distance d from the optical center to the subject X is obtained based on the distance p by using a formula: d=B×f/p provided that the base line length B and the focal point distance f are known.
In many cases, the stereo camera devices are installed in a moving body such as a vehicle and used for measuring a distance. Due to this usage, the stereo camera devices are subjected to continuous vibrations and temperature changes. As described with reference to FIG. 7, in order to correctly measure (calculate) the distance, it is assumed that the optical axes of the two cameras in the parallel stereo camera device are parallel to each other. Therefore, when the parallelism of the optical axes is out of alignment (i.e., the optical axis of one camera rotates relative to the optical axis of the other camera, so that the optical axes are not parallel to each other), a positional misalignment of the imaging sensor in the lateral direction relative to the optical centers may displace (shift) the position where the image of the subject is to be formed in the parallax direction. Such misalignment of the optical system may cause a serious error in the distance measurement. This error is known as a “parallax offset”. As described with reference to FIG. 7, the parallax offset directly influences the parallax and degrades the accuracy of the distance measurement.
To prevent the degradation of the accuracy of the distance measurement, it is necessary to accurately adjust a parameter in the manufacturing process. However, due to vibrations during moving of the vehicle and time-dependent changes in the distortion of the vehicle body, temperature change and the like, the misalignment may occur. To overcome the misalignment, namely in order to maintain the accuracy of the positional relationship between the two cameras in the stereo camera device, there may be one method of adjusting (correcting) the device by using a test chart which is an image having a known distance from the device after the shipment (sales) of the stereo camera device. However, during the adjustment (correction) using the test chart, the stereo camera device may not be used. Namely, when this method is used, availability of the stereo camera device may be greatly reduced.
To overcome the inconvenience of the method, there have been proposed several methods in which the adjustment (correction) is made by using a subject in a scene while moving without using the test chart, the subject having a known feature (e.g., a white lane having a known distance, a traffic signal, and a utility pole). For example, Japanese Patent Application Publication No. 10-341458 (Patent Document 1) discloses a technique in which, to detect the misalignment of the stereo camera device in the installation direction, the figures of static subjects are memorized first and a static subject is recognized by comparing the memorized data. Then, the parallax offset is calculated based on the moved distance measured by a velocity sensor or the like and the distance to the recognized static subject. Further, Japanese Patent No. 3436074 (Patent Document 2) discloses an in-vehicle stereo camera device that performs a correction process based on images of the same static subjects disposed at plural positions and distances between the plural positions. Further, Japanese Patent Application Publication No. 2009-176090 (Patent Document 3) describes an environment recognition device that detects a subject based on an imaged image and determines a surrounding environment. Further, Japanese Patent Application Publication No. 2009-288233 (Patent Document 4) describes a technique of correcting the tilt of an image imaged by a camera.